package browser;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

import javax.swing.JTextField;

public class EdilenKeyLisnener extends KeyAdapter 
{
	private int edilen;
	
	public EdilenKeyLisnener(int edilen)
	{
		super();
		this.edilen=edilen;
	}
		

	@Override
	public void keyTyped(KeyEvent arg0) 
	{
		int currLen = ((JTextField)arg0.getSource()).getText().length();
		if(currLen>=edilen)
			arg0.consume();
	}

}
